/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-01-03 09:36:06
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-01-03 09:55:36
 * @FilePath: \ZHGD-Vue2\src\views\ReportDesign\components\PropDesign\components\ReportBind\mixin\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const bindMixin = {
    data() {
        return {
            dictData: [
                {
                    dictId: "1711674899901308930",
                    dictName: "张拉记录表",
                    dictType: "tensioning_report"
                },
                {
                    dictId: "1711674899901308942",
                    dictName: "张拉记录表15",
                    dictType: "tensioning_report_15"
                },
                {
                    dictId: "1711674899901308931",
                    dictName: "压浆记录表",
                    dictType: "grouting_report"
                },
                {
                    dictId: "1711674899901308933",
                    dictName: "混凝土抗压强度记录表",
                    dictType: "compressive_strength"
                },
                {
                    dictId: 170,
                    dictName: "测试勿动",
                    dictType: 'test_report'
                },
                {
                    dictId: '1711674899901308935',
                    dictName: "热轧带肋钢筋",
                    dictType: 'ribbed_ba'
                },
                {
                    dictId: '1711674899901308939',
                    dictName: "钢筋焊接检测报告",
                    dictType: 'gjhj_bao'
                },
                {
                    dictId: '1711674899901308940',
                    dictName: "钢筋机械连接报告",
                    dictType: 'gjjxlj_bao'
                },
                
            ]
        }
    },
    methods: {
        dictTypeDict(val) {
            return this.dictData.find(item => item.dictType === val)?.dictName || "";
        },
        handleTagType(bindStatus) {
            let type = "";
            if (bindStatus === 0) type = 'info';
            else if (bindStatus === 1) type = 'success';
            else if (bindStatus === 2) type = 'danger';
            return type;
        },
        hanleTagText(bindStatus) {
            let val = "";
            if (bindStatus === 0) val = '待绑定';
            else if (bindStatus === 1) val = '已绑定';
            else if (bindStatus === 2) val = '失效';
            return val;
        }
    }
}

export default bindMixin;